﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActiveOrder.aspx.cs" Inherits="WebApplication1.ActiveOrder" MasterPageFile="~/masterpage/User.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <%--Begin Loading ajax section--%>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div style="position: fixed; text-align: center; height: 100%; width: 100%; top: 0; right: 0; left: 0; z-index: 9999999; background-color: #000000; opacity: 0.7;">
                <div class="center">

                    <img alt="" src="images/loading.gif" />
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <%--End Loading ajax section--%>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="container-fluid">

                <fieldset>
                    <legend>Active Order </legend>
                    <!-- Alert Message -->
                    <asp:Panel ID="divMessage" runat="server" class="alert alert-danger  alert-dismissible" Visible="False" role="alert">
                        <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <asp:Label ID="lblMessage" runat="server" Text="">
                         
                        </asp:Label>
                    </asp:Panel>
                    <asp:ObjectDataSource ID="odsGetFoodDetailsByCaterer" runat="server" SelectMethod="GetOrderDetailsByCaterer" TypeName="Business.Order" OnSelecting="odsGetFoodDetailsByCaterer_Selecting">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="" Name="email" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </fieldset>

                <div class="control-group col-md-12">



                    <asp:ListView ID="ListView1" runat="server" DataSourceID="odsGetFoodDetailsByCaterer" OnItemDataBound="ListView1_ItemDataBound">


                        <EmptyDataTemplate>
                            <table runat="server" style="">
                                <tr>
                                    <td>No data was returned.</td>
                                </tr>
                            </table>
                        </EmptyDataTemplate>

                        <ItemTemplate>
                            <tr style="">

                               
                                <td>
                                    <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("OrderId") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("FoodName") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodIdLabel" runat="server" Text='<%# Eval("FoodQuantity") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodNameLabel" runat="server" Text='<%# Eval("FoodPrice") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblOrderBy" runat="server" Text='<%# Eval("fos_Order.fos_User.WWID") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="lblOrderTime" runat="server" Text='<%# Eval("fos_Order.CreatedDate") %>' />
                                </td>
                                <td>
                                    <asp:CheckBox ID="chkboxPick" runat="server" AutoPostBack="true" OnCheckedChanged="chkboxPick_CheckedChanged" Checked='<%# Eval("IsPickup") %>'   ClientIDMode="AutoID"/>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <LayoutTemplate>



                            <table id="itemPlaceholderContainer" runat="server" border="0" class="table table-hover table-bordered">
                                <tr runat="server" class="info">

                                
                                    <th runat="server">OrderID</th>


                                    <th runat="server">Food Name</th>
                                    <th runat="server">Food Quantity</th>
                                    <th runat="server">Food Price</th>
                                    <th runat="server">Order By (WWID)</th>
                                    <th runat="server">Order Date</th>
                                    <th runat="server">[x] Pick</th>

                                </tr>
                                <tr id="itemPlaceholder" runat="server">
                                </tr>



                            </table>
                        </LayoutTemplate>
                        <SelectedItemTemplate>
                            <tr style="">
                                <td>
                                    <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="Edit" />
                                </td>
                                <td>
                                    <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodIdLabel" runat="server" Text='<%# Eval("FoodId") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodNameLabel" runat="server" Text='<%# Eval("FoodName") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodQuantityLabel" runat="server" Text='<%# Eval("FoodQuantity") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="FoodPriceLabel" runat="server" Text='<%# Eval("FoodPrice") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="fos_OrderLabel" runat="server" Text='<%# Eval("fos_Order") %>' />
                                </td>
                                <td>
                                    <asp:Label ID="fos_FoodLabel" runat="server" Text='<%# Eval("fos_Food") %>' />
                                </td>
                            </tr>
                        </SelectedItemTemplate>
                    </asp:ListView>
                      <asp:DataPager ID="dp" runat="server" PagedControlID="ListView1" ClientIDMode="AutoID">
                        <Fields>
                            <asp:NumericPagerField />

                        </Fields>
                    </asp:DataPager>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


